package com.example.fireassistant_server.repository;

import com.example.fireassistant_server.entity.User;
import com.example.fireassistant_server.entity.WeChatUser;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.Optional;

public interface WechatUserRepository extends JpaRepository<WeChatUser, String>, JpaSpecificationExecutor<WeChatUser> {
    Optional<WeChatUser> getWeChatUserByOpenId(String openId);

    Optional<WeChatUser> getWeChatUserByUser(User user);

    void deleteByUserId(String userId);

}
